package com.ikun.hospayservice.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDate;
import java.util.Map;

public interface WxPayService {

    /**
     * 生成预约挂号订单
     * @param userId
     * @param departmentId
     * @param docId
     * @param patId
     * @param typeId
     * @param money
     * @param date
     * @param timeId
     * @return
     * @throws Exception
     */
    Map<String, String> makeOrder(Integer userId, Integer departmentId, Integer docId, Integer patId, Integer typeId, String money, String date, Integer timeId) throws Exception;

    /**
     * 生成二维码
     *
     * @param codeUrl
     * @param response
     */
    void makeQRCode(String codeUrl, HttpServletResponse response) throws Exception;

    /**
     * 检查支付状态
     */
    String checkOrder(String tradeNo) throws Exception;

    /**
     * 支付回调
     *
     * @param request
     * @param response
     */
    void payCallback(HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 取消订单
     *
     * @param tradeNo
     */
    void cancelOrder(String tradeNo);
}
